package com.ruoyi.modules.appController;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.modules.domain.TopUpRule;
import com.ruoyi.modules.service.ITopUpRuleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;

/**
 * 充值规则Controller
 *
 * @author ruoyi
 * @date 2022-02-04
 */
@Api(tags = "app - 充值规则")
@RestController
@RequestMapping("/app/topUpRule")
public class AppTopUpRuleController extends BaseController {
    @Autowired
    private ITopUpRuleService topUpRuleService;

    /**
     * 查询充值规则列表
     */
    @ApiOperation(value="充值规则列表", notes="充值规则列表")
    @GetMapping("/list")
    public TableDataInfo list() {
        List<TopUpRule> list = topUpRuleService.list(new LambdaQueryWrapper<TopUpRule>().orderByAsc(TopUpRule::getNum));
        return getDataTable(list);
    }


}
